<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<div id="formsContent">
<p>Admission Inquiry Form to be filled when someone comes for
admission inquiry at the front desk.</p>
<form:form id="form" method="post" modelAttribute="inquiryForm"
	cssClass="cleanform">
	<div class="header">
	<h4>New Admission Enquiry Form</h4>
	<c:if test="${not empty message}">
		<div id="message" class="success">${message}</div>
	</c:if> <s:bind path="*">
		<c:if test="${status.error}">
			<div id="message" class="error">Form has errors</div>
		</c:if>
	</s:bind></div>
	<fieldset><legend>Student Info</legend>

	<table border="0">
		<tr>
			<td><form:label path="studentFirstName">First Name</form:label></td>
			<td><form:input path="studentFirstName" /></td>
			<td colspan="2"><form:errors path="studentFirstName"
				cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="studentMiddleName">Middle Name </form:label></td>
			<td><form:input path="studentMiddleName" /></td>
			<td colspan="2"><form:errors path="studentMiddleName"
				cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="studentLastName">	Last Name </form:label></td>
			<td><form:input path="studentLastName" /></td>
			<td colspan="2"><form:errors path="studentLastName"
				cssClass="error" /></td>
		</tr>

		<tr>
			<td width="150"><form:label path="sex">
		  			Sex </form:label></td>
			<td>
			<table>
				<tr>
					<td><form:label path="sex">Male</form:label><form:radiobutton
						path="sex" value="m" cssStyle="width:30px" /></td>
					<td><form:label path="sex">Female</form:label><form:radiobutton
						path="sex" value="f" cssStyle="width:30px" /></td>
				</tr>
			</table>
			</td>
			<td><form:errors path="sex" cssClass="error" /></td>
		</tr>
		<tr>
			<td width="150"><form:label path="age">
		  			Age </form:label></td>
			<td><form:select path="age" id="age">
				<form:option value="0" label="-- Select --" />
				<form:options items="${age}" />
			</form:select></td>
			<td><form:errors path="age" cssClass="error" /></td>
		</tr>
		<tr>
			<td colspan="3">
			<hr />
			</td>
		</tr>
		<tr>
			<td width="150"><form:label path="admissionClass">
		  			Seeking Admission To </form:label></td>
			<td><form:select path="admissionClass" id="admissionClass">
				<form:option value="0" label="-- Select --" />
				<form:options items="${classList}" itemLabel="className"
					itemValue="classId" />
			</form:select></td>
			<td><form:errors path="admissionClass" cssClass="error" /></td>
		</tr>
		<tr>
			<td width="150"><form:label path="currentSchool">
		  			Current School Name </form:label></td>
			<td><form:input path="currentSchool" /></td>
			<td><form:errors path="currentSchool" cssClass="error" /></td>
		</tr>
		<tr>
			<td width="150"><form:label path="schoolCity">
		  			School City </form:label></td>
			<td><form:select path="schoolCity" id="schoolCity">
				<form:option value="0" label="-- Select --" />
				<form:options items="${classList}" itemLabel="cityName"
					itemValue="cityId" />
			</form:select></td>
			<td><form:errors path="schoolCity" cssClass="error" /></td>
		</tr>
		<tr>
			<td width="150"><form:label path="schoolCountry">
		  			School Country </form:label></td>
			<td><form:select path="schoolCountry" id="schoolCountry">
				<form:option value="1" label="India" />
				<form:option value="0" label="-- Select --" />
			</form:select></td>
			<td><form:errors path="schoolCountry" cssClass="error" /></td>
		</tr>
		<tr>
			<td colspan="3">
			<hr />
			</td>
		</tr>
		<tr>
			<td><form:label path="parentFirstName">Parent's First Name</form:label></td>
			<td><form:input path="parentFirstName" /></td>
			<td colspan="2"><form:errors path="parentFirstName"
				cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="parentMiddleName">Parent's Middle Name</form:label></td>
			<td><form:input path="parentMiddleName" /></td>
			<td colspan="2"><form:errors path="parentMiddleName"
				cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="parentLastName">Parent's Last Name</form:label></td>
			<td><form:input path="parentLastName" /></td>
			<td colspan="2"><form:errors path="parentLastName"
				cssClass="error" /></td>
		</tr>
		<tr>
			<td width="150"><form:label path="addressLineOne">Address Line One</form:label></td>
			<td width="200"><form:input id="addressLineOne"
				path="addressLineOne" cssStyle="width: 200px;" /></td>
			<td class="error">&nbsp;<form:errors path="addressLineOne"
				cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td width="150"><form:label path="addressLineTwo">Address Line Two</form:label></td>
			<td width="200"><form:input id="addressLineTwo"
				path="addressLineTwo" cssStyle="width: 200px;" /></td>
			<td class="error">&nbsp;<form:errors path="addressLineTwo" /></td>
		</tr>
		<tr>
			<td width="150"><form:label path="addressLineThree">Address Line Three</form:label></td>
			<td width="200"><form:input id="addressLineThree"
				path="addressLineThree" cssStyle="width: 200px;" /></td>
			<td class="error">&nbsp;<form:errors path="addressLineThree" /></td>
		</tr>
		<tr>
			<td width="150"><form:label path="zipCode">Zip Code</form:label></td>
			<td width="150"><form:input id="zipCode" path="zipCode"
				maxlength="6" /></td>
			<td class="error">&nbsp;<form:errors path="zipCode"
				cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td><form:label path="city">City</form:label></td>
			<td><form:select path="city" id="city">
				<form:option value="0" label="-- Select --" />
				<form:options items="${cityList}" itemLabel="cityName"
					itemValue="cityId" />
			</form:select></td>
			<td class="error" width="250"><form:errors path="sex"
				cssStyle="color:red;" /></td>
		</tr>

		<tr>
			<td><form:label path="country">Country</form:label></td>
			<td><form:select path="country" id="country">
				<form:option value="0" label="-- Select --" />
				<form:options items="${countryList}" />
			</form:select></td>
			<td class="error" width="250"><form:errors path="country"
				cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td colspan="2">
			<table>
				<tr>
					<td><input type="button" value="Reset" class="button" /></td>
					<td><input type="submit" value="Save"
						class="button" /></td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
	</fieldset>
</form:form></div>
</body>
</html>